refresh database

Hello,

what is the trick to refresh that database meaning I have a granting access script and if user1 changes permission to a Module while user2 is login into the same database then user2 attempts to change permissions using the script user2 does see the changes(permissions) made by user1 until they excute the script twice.
 

string ObjId, Text
Skip skpObjects = createString()  // KEY 'string' ObjId; DATA 'Object' handle
 
for obj in entire mod do
{  if (isDeleted(obj))   continue
   put(skpObjects, identifier(obj), obj)
}
for obj in skpObjects do
{  ObjId = (string key skpObjects)
   Text = richTextWithOle(obj, "Object Text")
   ...
}
delete(skpObjects)

SystemAdmin - Thu Jun 28 11:53:58 EDT 2012

Re: refresh database
SystemAdmin - Thu Jun 28 12:25:08 EDT 2012

hello,

I believe I found the solution see below:

refreshDBExplorer() 
 
    //Get the selected items and add them to the module list view.
        for I in selectedItems do
        {
                if(isDeleted(I) || null I) {continue}
 
                if(canControl(I))
                {
                        addItemToList (I)
                }
                else
                {
                        errorBox("Cannot switch access {" name(I) "}")
                }
        }

 


by using refreshDBExplorer it refreshes the explorer and when calling "Add item(s)" parsing through the directory structure it refreshes the permissions. Is my logic correct?

Thank you,
-Jim

 

Re: refresh database
Mathias Mamsch - Fri Jun 29 18:38:45 EDT 2012

SystemAdmin - Thu Jun 28 12:25:08 EDT 2012

hello,

I believe I found the solution see below:

refreshDBExplorer() 
 
    //Get the selected items and add them to the module list view.
        for I in selectedItems do
        {
                if(isDeleted(I) || null I) {continue}
 
                if(canControl(I))
                {
                        addItemToList (I)
                }
                else
                {
                        errorBox("Cannot switch access {" name(I) "}")
                }
        }

 


by using refreshDBExplorer it refreshes the explorer and when calling "Add item(s)" parsing through the directory structure it refreshes the permissions. Is my logic correct?

Thank you,
-Jim

 

I am not sure if that works. My experience is that in most cases, users will need to logout and login again, before modified access rights apply. So I am not sure that problem will be solvable.

If you have two users setting access rights on the same modules at the same time, then you might have a process issue. Why would this happen? Shouldnt there be one person or group that maintain access to certain modules are shouldn't they be able to organize themselfes that this does not happen?

By the way, the loop:
 

for p in database do {
   for I in p do {
   }
}

 


will loop over the same items twice, if you have nested projects, i.e. a project inside another project. Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

Re: refresh database
llandale - Sat Jun 30 14:32:47 EDT 2012

Mathias Mamsch - Fri Jun 29 18:38:45 EDT 2012

I am not sure if that works. My experience is that in most cases, users will need to logout and login again, before modified access rights apply. So I am not sure that problem will be solvable.

If you have two users setting access rights on the same modules at the same time, then you might have a process issue. Why would this happen? Shouldnt there be one person or group that maintain access to certain modules are shouldn't they be able to organize themselfes that this does not happen?

By the way, the loop:
 

for p in database do {
   for I in p do {
   }
}

 


will loop over the same items twice, if you have nested projects, i.e. a project inside another project. Regards, Mathias

 

 

 


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

 

 

[1] either: Add to the top of the Project loop:
  • if (!null getParentProject(p)) continue // Ignore nested Projects
[2] or: Add to the top of the Item loop:
  • if (getParentProject(I) != p) continue // Ignore items is nested Projects

I like [2] as it processes the items of each Project in a single block

-Louie